﻿@model IEnumerable<MvcAtletIS.Areas.Admin.Models.ImageViewModel>
@{
    ViewBag.Title = "Obrázky";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Obrázky</h2>

@using (Html.BeginForm())
{   
    <div class="filter-frame">
        
        <div class="filter-item">
            <div class="editor-label">
                Filter
            </div>
            <div class="editor-field">
                Vyhľadať podľa názvu: @Html.TextBox("ImageName")
                <input type="submit" value="Vyhľadať" />
            </div>
        </div>
    
    </div>
}

<p>
    @Html.ActionLink("< Administrácia", "Index", "Home", new { area = "Admin" }, null) |
    @Html.ActionLink("Pridať nový obrázok", "Create")
</p>

@if (Model != null && Model.Count() > 0)
{
    foreach (var item in Model)
    {
        <div class="article-image">
            <img src="@Url.Content(item.Path)" alt="image" width="300px" />
            <p>@item.Name</p>
        </div>
    }
}
